$: << File.join(File.expand_path(File.dirname(__FILE__)), "..")

require 'rubygems'
require 'mapper/Sample'
require 'test/unit'

class MapperTest < Test::Unit::TestCase
	@@file = "test.data"
	def test_sample
		cls = Sample.new('--size 5')
		file = File.new(@@file,"r")
		while(line=file.gets)
			cls.execute(line)
		end
		output = []
		cls.print{|line|
			output << line	
		}
		assert_equal(output.length, 5)
	end
end
	